package com.sy.test.takenumberdemo.application;

import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;

/**
 * Created by weichongbin on 2019/04/28.
 */
public class BaseApplication extends Application {
    private static BaseApplication instance;
    public static SharedPreferences sharedPreferences;
    public static final String mTAG = "millon";
    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        sharedPreferences =this.getSharedPreferences(mTAG, Context.MODE_PRIVATE);
        Resources res = super.getResources();
        Configuration config = new Configuration();
        config.setToDefaults();
        res.updateConfiguration(config, res.getDisplayMetrics());

    }

    public static BaseApplication getApp() {
        return instance;
    }
}
